package dsk.demo.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * 
 * 
 * @author daishikun
 * @email 940798525@qq.com
 * @date 2022-09-17 09:09:41
 */
@Data
@TableName("product_ref")
public class ProductRefEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 自有商品号码
	 */
	private String productNo;
	/**
	 * 互换号码
	 */
	private String refNo;
	/**
	 * 互换号码归属 品牌
	 */
	private String brand;

	/**
	 * 查询号码
	 */
	private String searchNo;

	/**
	 * 本厂查询号码
	 */
	private String searchProductNo;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		ProductRefEntity that = (ProductRefEntity) o;
		if (that.id != null && id != null) {
			return Objects.equals(id, that.id);
		}
		return Objects.equals(productNo, that.productNo) && Objects.equals(refNo, that.refNo) && Objects.equals(brand, that.brand);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, productNo, refNo, brand, searchNo);
	}
}
